package com.rgs.gateway.authentication.server.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rgs.gateway.authentication.server.entity.po.UserPO;
import com.rgs.gateway.authentication.server.mapper.UserMapper;
import com.rgs.gateway.authentication.server.service.IUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class UserServiceImpl extends ServiceImpl<UserMapper, UserPO> implements IUserService {


    @Override
    public UserPO getAuthUserInfo(String appKey) {
        LambdaQueryWrapper<UserPO> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(UserPO::getAppKey, appKey);
        return this.getOne(wrapper);
    }
}
